package com.xinyuan.trade.Fragment;

import android.os.Bundle;
import android.support.v4.app.Fragment;

import com.nostra13.universalimageloader.core.ImageLoader;
import com.xinyuan.trade.Activity.BaseActivity;
import com.xinyuan.trade.Adaptive.UIAdapter;

/**
 * Fragment基类
 * @author daiy
 *
 */
public abstract class BaseFragment extends Fragment {

	protected ImageLoader imageLoader = ImageLoader.getInstance();
	
	protected UIAdapter uiAdapter;
	protected BaseActivity mActivity;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		mActivity = (BaseActivity) getActivity();
		uiAdapter = UIAdapter.getInstance(mActivity);
	}

	@Override
	public void onDestroy() {
		super.onDestroy();
		imageLoader.clearMemoryCache();
		System.gc();
	}
}
